<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Word Player By 陆上行舟</title>
    <meta name="viewport" content="width=440,user-scalable=no">
    <style>
        body{
            font-family:Arial,Helvetica,sans-serif;
            color:#6A6B6F;
            text-align:center;
            padding-top:17px;
            width:470px;
            margin:0 auto;
        }
        h1{
            font-size:36px;
        }
        h2{
            font-size:24px;
        }
        p{
            font-size:18px;
        }
        #skPlayer{
            margin:27px auto 0;
        }
        .container{
            margin-top:200px;
        }
        .doc{
            text-align:left;
        }
        pre{
            padding-left:2em;
            font-size:16px;
            line-height:24px;
            color:#fff;
            background-color:#272822;
            border-radius:3px;
        }
        @media screen and (max-width:768px){
            body{
                width:100%;
            }
            .doc{
                display:none;
            }
        }
    </style>
</head>
<body>

    <h1>Word Player</h1>
    <p><b>棋棋同学的单词播放器</b></p>
	<p>冀教版小学三年级下册单词</p>


    <div id="skPlayer"></div>
    <div class="container">
        <h4 >By: 陆上行舟</h4>
		<p>公众号：潼关人</p>
		<a href='https://mp.weixin.qq.com/s?__biz=MzA5NTM4ODcyNQ==&mid=2456924615&idx=1&sn=15c7bac7502655cc70eff340f2aad394&chksm=87c5049db0b28d8b539b9ac2a0341ea9dc33d23f6e96b6eefbcbd0aa77f11ae49001c3713bd2&xtrack=1&scene=0&subscene=131&clicktime=1553354070&ascene=7&devicetype=android-27&version=2700033b&nettype=WIFI&abtest_cookie=BQABAAgACgALABIAEwAGAJ%2BGHgAklx4AVpkeANKZHgDcmR4A3pkeAAAA&lang=zh_CN&pass_ticket=5tuh35pBQTHCoLD1u10xSBf4fNS182QSX5Fcfp8RnukyzMn8XvxcCRNzjgwu5hmp&wx_header=1'> <img src = tgr.jpg height="200" width="200"></a>
		<p>单词录入：棋棋同学   单词数量：190个   播放用时： 5 分钟左右  可循环播放  需要网络连接，建议连接 wifi 播放</p>
    </div>
  
    <script src="./dist/skPlayer.min.js"></script>

    <script>
		function readTextFile(file, callback) {  
			var rawFile = new XMLHttpRequest();  
			rawFile.overrideMimeType("application/json");  
			rawFile.open("GET", file, true);  
			rawFile.onreadystatechange = function() {  
			if (rawFile.readyState === 4 && rawFile.status == "200") {  
				callback(rawFile.responseText);  
				}  
			}
	    rawFile.send(null);  
		}

		readTextFile("words.json", function(text){  
		    var data = JSON.parse(text);
			console.log(data);  

			var player = new skPlayer({

			autoplay: true,
			music: {
				type: 'file',
				source: data

				}
			})

			}); 
    </script>
</body>
</html>